/*
 * Trilogy instant messaging system
 * Nathan Reitz, Aaron Mertz, Dave Clark
 * 11/14/2007
*/
package edu.psu.ist.ist311.trilogyIM;

public class Receiver{
	private String name;
	private Conversation conversation;
	
	public Receiver (String name) {
		this.name = name;
	}
	
	//returns the name of the receiver
	public String getReceiverName() {
		return this.name;
	}
	
	//sends a message to the conversation
	public void sendMessage(String message){
		Message msg1 = new Message(message,name);
		conversation.addMessage(msg1);
	}
	
	//attaches conversation to receiver
	public void attachConversation(Conversation convo){
		conversation = convo;
	}
}
